package phapp.model.qfd;

import java.io.File;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import javacommon.base.BaseEntity;

/**
 * Title: t_qfd_data 数据类 POJO Description: DAO层映射到数据类,页面封装数据映射到数据类 Copyright:
 * Copyright (c) 2012-10 Company:
 * 
 * @author you name
 * @version 1.0
 */

public class Qfd extends BaseEntity
{

   // date formats
   public static final String FORMAT_CREATE_DATE = DATE_TIME_FORMAT;
   public static final String FORMAT_UPDATE_DATE = DATE_TIME_FORMAT;

   // columns START
   /** qfdId */
   private java.lang.Integer qfdId;
   /** qfdName */
   private java.lang.String qfdName;
   /** qfdDesc */
   private java.lang.String qfdDesc;
   /** qfdNote */
   private java.lang.String qfdNote;
   /** imgUrl */
   private java.lang.String imgUrl;
   /** imgFile */
   private java.lang.String imgFile;
   /** chargeFlag */
   private java.lang.Integer chargeFlag;
   /** qfdType */
   private java.lang.String qfdType;
   /** qfdPrice */
   private java.lang.Integer qfdPrice;
   /** saleCount */
   private java.lang.Integer saleCount;
   /** popularCount */
   private java.lang.Integer popularCount;
   /** qfdStatus */
   private java.lang.Integer qfdStatus;
   /** createDate */
   private java.sql.Timestamp createDate;
   /** updateDate */
   private java.sql.Timestamp updateDate;

   private java.util.ArrayList idList;

   // columns END

   public Qfd()
   {
   }

   public Qfd(java.lang.Integer qfdId)
   {
      this.qfdId = qfdId;
   }

   public void setId(java.lang.Integer value)
   {
      this.qfdId = value;
   }

   public java.lang.Integer getId()
   {
      return this.qfdId;
   }

   public void setQfdId(java.lang.Integer value)
   {
      this.qfdId = value;
   }

   public java.lang.Integer getQfdId()
   {
      return this.qfdId;
   }

   public void setQfdName(java.lang.String value)
   {
      this.qfdName = value;
   }

   public java.lang.String getQfdName()
   {
      return this.qfdName;
   }

   public void setQfdDesc(java.lang.String value)
   {
      this.qfdDesc = value;
   }

   public java.lang.String getQfdDesc()
   {
      return this.qfdDesc;
   }

   public void setQfdNote(java.lang.String value)
   {
      this.qfdNote = value;
   }

   public java.lang.String getQfdNote()
   {
      return this.qfdNote;
   }

   public void setImgUrl(java.lang.String value)
   {
      this.imgUrl = value;
   }

   public java.lang.String getImgUrl()
   {
      return this.imgUrl;
   }

   public void setImgFile(java.lang.String value)
   {
      this.imgFile = value;
   }

   public java.lang.String getImgFile()
   {
      return this.imgFile;
   }

   public void setChargeFlag(java.lang.Integer value)
   {
      this.chargeFlag = value;
   }

   public java.lang.Integer getChargeFlag()
   {
      return this.chargeFlag;
   }

   public void setQfdType(java.lang.String value)
   {
      this.qfdType = value;
   }

   public java.lang.String getQfdType()
   {
      return this.qfdType;
   }

   public void setQfdPrice(java.lang.Integer value)
   {
      this.qfdPrice = value;
   }

   public java.lang.Integer getQfdPrice()
   {
      return this.qfdPrice;
   }

   public void setSaleCount(java.lang.Integer value)
   {
      this.saleCount = value;
   }

   public java.lang.Integer getSaleCount()
   {
      return this.saleCount;
   }

   public void setPopularCount(java.lang.Integer value)
   {
      this.popularCount = value;
   }

   public java.lang.Integer getPopularCount()
   {
      return this.popularCount;
   }

   public void setQfdStatus(java.lang.Integer value)
   {
      this.qfdStatus = value;
   }

   public java.lang.Integer getQfdStatus()
   {
      return this.qfdStatus;
   }

   public String getCreateDateString()
   {
      return date2String(getCreateDate(), FORMAT_CREATE_DATE);
   }

   public void setCreateDateString(String value)
   {
      setCreateDate(string2Date(value, FORMAT_CREATE_DATE, java.sql.Timestamp.class));
   }

   public void setCreateDate(java.sql.Timestamp value)
   {
      this.createDate = value;
   }

   public java.sql.Timestamp getCreateDate()
   {
      return this.createDate;
   }

   public String getUpdateDateString()
   {
      return date2String(getUpdateDate(), FORMAT_UPDATE_DATE);
   }

   public void setUpdateDateString(String value)
   {
      setUpdateDate(string2Date(value, FORMAT_UPDATE_DATE, java.sql.Timestamp.class));
   }

   public void setUpdateDate(java.sql.Timestamp value)
   {
      this.updateDate = value;
   }

   public java.sql.Timestamp getUpdateDate()
   {
      return this.updateDate;
   }

   public java.util.ArrayList getIdList()
   {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList)
   {
      this.idList = idList;
   }

   private File[] uploadFileSet;
   private String[] uploadFileNameSet;

   public File[] getUploadFileSet()
   {
      return uploadFileSet;
   }

   public void setUploadFileSet(File[] uploadFileSet)
   {
      this.uploadFileSet = uploadFileSet;
   }

   public String[] getUploadFileNameSet()
   {
      return uploadFileNameSet;
   }

   public void setUploadFileNameSet(String[] uploadFileNameSet)
   {
      this.uploadFileNameSet = uploadFileNameSet;
   }
   
   
   /** 手动增加属性后,toString,hashCode,equals都要修改 */
   public String toString()
   {
      return new ToStringBuilder(this).append("QfdId", getQfdId()).append("QfdName", getQfdName())
               .append("QfdDesc", getQfdDesc()).append("QfdNote", getQfdNote()).append("ImgUrl", getImgUrl())
               .append("ImgFile", getImgFile()).append("ChargeFlag", getChargeFlag()).append("QfdType", getQfdType())
               .append("QfdPrice", getQfdPrice()).append("SaleCount", getSaleCount()).append("PopularCount", getPopularCount())
               .append("QfdStatus", getQfdStatus()).append("CreateDate", getCreateDate()).append("UpdateDate", getUpdateDate())
               .toString();
   }

   public int hashCode()
   {
      return new HashCodeBuilder().append(getQfdId()).append(getQfdName()).append(getQfdDesc()).append(getQfdNote())
               .append(getImgUrl()).append(getImgFile()).append(getChargeFlag()).append(getQfdType()).append(getQfdPrice())
               .append(getSaleCount()).append(getPopularCount()).append(getQfdStatus()).append(getCreateDate())
               .append(getUpdateDate()).toHashCode();
   }

   public boolean equals(Object obj)
   {
      if(obj instanceof Qfd == false) return false;
      if(this == obj) return true;
      Qfd other = (Qfd) obj;
      return new EqualsBuilder().append(getQfdId(), other.getQfdId()).append(getQfdName(), other.getQfdName())
               .append(getQfdDesc(), other.getQfdDesc()).append(getQfdNote(), other.getQfdNote())
               .append(getImgUrl(), other.getImgUrl()).append(getImgFile(), other.getImgFile())
               .append(getChargeFlag(), other.getChargeFlag()).append(getQfdType(), other.getQfdType())
               .append(getQfdPrice(), other.getQfdPrice()).append(getSaleCount(), other.getSaleCount())
               .append(getPopularCount(), other.getPopularCount()).append(getQfdStatus(), other.getQfdStatus())
               .append(getCreateDate(), other.getCreateDate()).append(getUpdateDate(), other.getUpdateDate()).isEquals();
   }
}
